﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Demo
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        public static string strName;//声明成员变量，用来记录登录用户名
        private void Form1_Load(object sender, EventArgs e)
        {
            textBox2.PasswordChar = '*';
        }

        private void button1_Click(object sender, EventArgs e)
        {
            strName = textBox1.Text;//记录登录用户
            Form2 frm = new Form2();//创建Form2窗体对象
            this.Hide();//隐藏当前窗体
            frm.Show();//显示Form2窗体
        }
    }
}
